package com.geekaca.news.mapper;

import com.geekaca.news.domain.NewsComment;
import com.geekaca.news.utils.PageBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Peter
* @description 针对表【tb_news_comment】的数据库操作Mapper
* @createDate 2024-02-16 16:50:15
* @Entity com.geekaca.news.domain.NewsComment
*/
@Mapper
public interface NewsCommentMapper {

//    int deleteByPrimaryKey(Long id);
    int commentDelete(@Param("commentId") Long id);

    int insert(NewsComment record);

    int insertSelective(NewsComment record);

    NewsComment selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(NewsComment record);

    int updateByPrimaryKey(NewsComment record);

    int updateCommentatorInt(@Param("commentId") int commentId,@Param("replyBody") String replyBody);

    int getTotalComments();

    List<NewsComment> getCommentList(@Param("start")int start, @Param("pageSize") int pageSize);

    int updateCheckStatus(@Param("commentId") Long id);

    List<NewsComment> findCommentList(PageBean pageBean);

    int getCommentCountByNewsId(@Param("newsId") Long newsId);
}
